﻿<UserControl x:Class="WpfApplication6.View.ProductsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:wpfApplication6="clr-namespace:WpfApplication6"
             xmlns:viewModel="clr-namespace:WpfApplication6.ViewModel"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <DataTemplate DataType="{x:Type viewModel:ProductViewModel}">
            <StackPanel Orientation="Horizontal">
                <Label Content="{Binding Path=Item.Id}" />
                <TextBox Width="150px" Text="{Binding Path=Item.Name}" />
                <TextBox Width="100" Text="{Binding Path=Item.CategoryName}"/>
            </StackPanel>
        </DataTemplate>
    </UserControl.Resources>
    <Grid>
        <ItemsControl ItemsSource="{Binding Path=ItemsList}" />
    </Grid>
</UserControl>